// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.worldMap;

import java.util.ArrayList;

public final class WorldMapFeature {
    public final WorldMapCell m_cell;
    public final ArrayList<WorldMapGeometry> m_geometries = new ArrayList();
    public WorldMapProperties m_properties = null;

    WorldMapFeature(WorldMapCell worldMapCell) {
        this.m_cell = worldMapCell;
    }

    public boolean hasLineString() {
        for (int _int = 0; _int < this.m_geometries.size(); _int++) {
            if (((WorldMapGeometry)this.m_geometries.get(_int)).m_type == WorldMapGeometry.Type.LineString) {
                return true;
            }
        }

        return false;
    }

    public boolean hasPoint() {
        for (int _int = 0; _int < this.m_geometries.size(); _int++) {
            if (((WorldMapGeometry)this.m_geometries.get(_int)).m_type == WorldMapGeometry.Type.Point) {
                return true;
            }
        }

        return false;
    }

    public boolean hasPolygon() {
        for (int _int = 0; _int < this.m_geometries.size(); _int++) {
            if (((WorldMapGeometry)this.m_geometries.get(_int)).m_type == WorldMapGeometry.Type.Polygon) {
                return true;
            }
        }

        return false;
    }

    public boolean containsPoint(float x, float y) {
        for (int _int = 0; _int < this.m_geometries.size(); _int++) {
            WorldMapGeometry worldMapGeometry = (WorldMapGeometry)this.m_geometries.get(_int);
            if (worldMapGeometry.containsPoint(x, y)) {
                return true;
            }
        }

        return false;
    }

    public void dispose() {
        for (WorldMapGeometry worldMapGeometry : this.m_geometries) {
            worldMapGeometry.dispose();
        }

        this.m_properties.clear();
    }
}
